using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class PatientDiseaseMap : EntityTypeConfiguration<PatientDisease>
    {
        public PatientDiseaseMap()
        {
            // Primary Key
            this.HasKey(t => t.patientDiseaseID);

            // Properties
            this.Property(t => t.patient_id)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("PatientDisease");
            this.Property(t => t.patientDiseaseID).HasColumnName("patientDiseaseID");
            this.Property(t => t.patient_id).HasColumnName("patient_id");
            this.Property(t => t.diseaseID).HasColumnName("diseaseID");
        }
    }
}
